pp108 : Attribute Properties Interface

Attribute Properties Interface

This topic describes the fields that you fill while adding an attribute to a WS-AppServer model.


These properties determine the behaviour of the attribute in the model to which it is being added.

Table 1. Attribute Properties

Property - Description
General Name The name of the attribute
Mapped Name

The name that corresponds to a column of the database table. This is also the name that is used to generate the accessor and mutator methods of an attribute. It is the name by which the attribute is implemented in the Java class. If you do not want to retain the default names, you may replace these with names of your preference.For example, in an attribute which has CustomerID as the
Name and CustID as the
Mapped Name, the following accessor and mutator methods are generated:

  • public void setCustID(String value)

  • public String getCustID()


    Note: The
    Mapped Name values take precedence over
    Name values, while generating these methods.
Type

The data type of the attribute. The following data types are supported:

  • boolean - A value of either 0 to represent 'false' or 1 to represent 'true'
  • Unsigned Byte (ui1) - A one-byte unsigned integer
  • Unsigned Short (ui2) - A two-byte unsigned integer
  • Unsigned Integer (ui4) - A four-byte unsigned integer
  • Unsigned Long (ui8) - An eight-byte unsigned integer
  • Short Integer (i2) - A two-byte short integer
  • Integer (i4) - A four-byte integer
  • Long Integer (i8) - An eight-byte long integer
  • Float (r4) - A floating point number with four-byte encoding
  • Double (r8) - A floating point number with double precision
  • Currency (cy) - A floating point number that represents 'currency' data types
  • string - String
  • guid - A string that represents a globally unique identifier
  • dateTime - A date with an optional time data
    Note: WS-AppServer always works with GMT/UTC date and time format. It is therefore recommended to follow the same format during application development. For example, in the soap method of implementation type "BsfJavaCall", the arguments of type "Date" must be handled appropriately.
  • Base64 encoded BLOB (bin.base64) - MIME-style Base64 encoded binary large object (BLOB)
Persistence

Determines the mode of persistence. The acceptable values are:

  • Blank (Persistent) - Default mode of mapping an attribute to a database column
  • Transient - Attribute does not map to a database column and is not persisted. The value will remain in memory as long as the transaction requires it and will be removed from the memory the moment transaction is over.
Changeability

Indicates the changeability property of the attribute. The permissible values are:

  • Changeable - Value can be modified at any point of time
  • addOnly - Value can be assigned anytime (during insert or update operation) but only once, and cannot be modified subsequently
  • Frozen - Value assigned during creation of the object but cannot be modified subsequently
Unique Determines whether the attribute is part of the unique identifier for the class
Required Indicates the necessity of providing a value for the attribute
Other Derived Displays the class from which this attribute is derived
Scale Indicates the number of digits to the right of the decimal point. This property is not applicable if you select String as the data type.
Precision Indicates the total number of digits used
Initial Indicates the initial value of the attribute, applicable only for validate requests
Lower/Upper Bounds Max Length Indicates the maximum length of the attribute. This is applicable for string data type only.
Note: For standard classes, the max length is determined by the actual length of the data.
Min Length Indicates the minimum length of the attribute. This is applicable for string data type only.
Min Inclusive Indicates the lower limit of the value, including the value. This is applicable for all data types excluding string.
Min Exclusive Indicates the lower limit of the value, excluding the value. This is applicable for all data types excluding string.
Max Inclusive Indicates the upper limit of the value, including the value. This is applicable for all data types excluding string.
Max Exclusive Indicates the upper limit of the value, excluding the value. This is applicable for all data types excluding string.